import http from '@/lib/http'

export interface AddressPayload {
  id?: number
  userId?: number
  linkUser?: string
  linkAddress?: string
  linkPhone?: string
}

export function fetchAddresses(params?: any) {
  return http.get('/address', { params })
}

export function addAddress(data: AddressPayload) {
  return http.post('/address', data)
}

export function updateAddress(data: AddressPayload) {
  return http.put('/address', data)
}

export function deleteAddressMany(idList: (number|string)[]) {
  return http.delete('/address', { params: { idList } })
}


